package com.weixiaodong.javabasic.Java中的枚举类型.后台用户角色管理.不同的角色对应不同的操作权限;

public enum UserRole implements RoleOperation {
    ROLE_ROOT_ADMIN {
        @Override
        public String op() {
            return "ROLE_ROOT_ADMIN" + ":" + "permission A";
        }
    },

    ROLE_ORDER_ADMIN {
        @Override
        public String op() {
            return "ROLE_ORDER_ADMIN" + ":" + "permission B";
        }
    },

    ROLE_NORMAL {
        @Override
        public String op() {
            return "ROLE_NORMAL" + ":" + "permission C";
        }
    }
}
